#ifndef AUX_TIME_H
#define AUX_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
#include "config.h"
#include "aux_types.h"
#include "aux_errno.h"
#include <sys/timeb.h>


#ifdef PLATFORM_WIN
#include <windows.h>
/* thread go to sleep */
#define aux_sleep_second(secs)  Sleep((secs)* 1000)
#define aux_sleep_ms(ms)        Sleep(ms)

#else
#ifdef PLATFORM_LINUX
#include <unistd.h>
#include <sys/time.h>

#define aux_sleep_second(secs)  sleep(secs)
#define aux_sleep_ms(ms)        usleep(1000 * (ms))
//#define aux_sleep_us(us)        usleep(us)

#endif
#endif

EErrNo aux_get_timestamp_ms(u64 *pllTime);

EErrNo aux_check_current_time_after(u64 llTime);

EErrNo aux_check_current_time_before(u64 llTime);
#ifdef __cplusplus
}
#endif
#endif

